//
//  gamePlayer.h
//  my-BTB
//
//  Created by QuickSoluion on 9/7/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "cocos2d.h"
#import "BTBworld.h"
#import  "Weapon.h"
#import "TauThuy.h"
#import "Character.h"
#import "DefenderDragSprite.h" 
#import "Bom.h"
#import "reviewlayer.h"
@interface gamePlayer : CCLayer {

	CGSize _sizeMap;
	NSMutableArray	*_bombs;
	Weapon *_bomweapons;
	
	DefenderDragSprite *imageBom;
	DefenderDragSprite * imageMissle;
	NSMutableArray *_arraySpriteBom;
	NSMutableArray *_arraySpriteMissle;
	
	
}
-(void)initMap;
- (void)handleScrolling:(NSSet *)touches ;
- (void) applyFrameLimits;
- (BOOL)isInside: (CGRect)rect: (CGPoint)p;
//-(void)SetupBomb:(CGPoint)P;
-(void)beginGame;
- (void) applyFrameLimitsbyLayer:(CCLayer *)Layer;
-(Character*)initEntityByClassOfgamePlayer:(Class)tempC:(CGPoint)p:(float)fScale:(BOOL)yes_noScale;

@end

@interface staticBGLayer : CCLayer
{
	
}
@end


@interface MainBGLayer : CCLayer
{   float _lenghtMay1;
	float _lenghtMay2;
	float _lenghtMay3;
	BOOL bMay1TurnRL;
	BOOL bMay2TurnRL;
	BOOL bMay3TurnRL;
	CCSprite * _may1;
	CCSprite * _may2;
	CCSprite * _may3;
	
	CCSprite *image1nuoc;
	CCSprite *image2nuoc;
}
@end


@interface bgAnimationLayer : CCLayer
{
	float _lenghtRun;
	BOOL bTurnRL;
	Character*itemTauThuy;
}

-(Character*)initEntityByClass:(Class)tempC:(CGPoint)p:(float)fScale:(BOOL)yes_noScale;
@end

@interface GameControlLayer: CCLayer{
	
	staticBGLayer *_staticBG;
	MainBGLayer *_mainBG;
	gamePlayer * _gameLayer;
	bgAnimationLayer *_bgAnimation;
	
	CCMenu *_menuSpecial;
	
	Character *_tempCharacterCar;
	reviewlayer *_rvLayer;
}

-(Character*)initEntityByClassOfgameControlPlayer:(Class)tempC:(CGPoint)p:(float)fScale:(BOOL)yes_noScale;
-(CCFiniteTimeAction *) getActionSequence: (NSMutableArray *) actions;
-(void)settupCarRunAndBeginControl;
- (void) clearCache;
-(void)settUpEnableClick;
-(void)changetoMenuGame;
@end